package com.csxy.systemmanager.dao;

import com.csxy.systemmanager.dto.AuthDto;
import org.apache.ibatis.annotations.Select;

import java.util.List;

public interface AuthDao {
    /**
     * 查询用户及其对应的角色
     */
    @Select(
        "SELECT sys_user_role.role_id,sys_user.user_name,sys_user.nick_name,sys_role.id,sys_role.name as role_name from sys_user_role left join sys_user on sys_user_role.user_id = sys_user.id left join sys_role on sys_user_role.role_id = sys_role.id"
    )
    public List<AuthDto> getUserAndRole();
}
